package com.qianlong.service.impl;

import com.qianlong.entity.User;
import com.qianlong.mapper.UserMapper;
import com.qianlong.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public int delete(String userId) {
        return userMapper.delete(userId);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public User getOne(String userId) {
        return userMapper.getOne(userId);
    }

    @Override
    public List<User> getList(User user) {
        return userMapper.getList(user);
    }

    @Override
    public int login(User user) { return userMapper.login(user); }
}
